package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CDetailsMapper;
import com.ruoyi.system.domain.CDetails;
import com.ruoyi.system.service.ICDetailsService;

/**
 * 采购明细Service业务层处理
 * 
 * @author GGJ
 * @date 2024-05-13
 */
@Service
public class CDetailsServiceImpl implements ICDetailsService 
{
    @Autowired
    private CDetailsMapper cDetailsMapper;

    /**
     * 查询采购明细
     * 
     * @param id 采购明细主键
     * @return 采购明细
     */
    @Override
    public CDetails selectCDetailsById(Long id)
    {
        return cDetailsMapper.selectCDetailsById(id);
    }

    /**
     * 查询采购明细列表
     * 
     * @param cDetails 采购明细
     * @return 采购明细
     */
    @Override
    public List<CDetails> selectCDetailsList(CDetails cDetails)
    {
        return cDetailsMapper.selectCDetailsList(cDetails);
    }

    /**
     * 新增采购明细
     * 
     * @param cDetails 采购明细
     * @return 结果
     */
    @Override
    public int insertCDetails(CDetails cDetails)
    {
        return cDetailsMapper.insertCDetails(cDetails);
    }

    /**
     * 修改采购明细
     * 
     * @param cDetails 采购明细
     * @return 结果
     */
    @Override
    public int updateCDetails(CDetails cDetails)
    {
        return cDetailsMapper.updateCDetails(cDetails);
    }

    /**
     * 批量删除采购明细
     * 
     * @param ids 需要删除的采购明细主键
     * @return 结果
     */
    @Override
    public int deleteCDetailsByIds(Long[] ids)
    {
        return cDetailsMapper.deleteCDetailsByIds(ids);
    }

    /**
     * 删除采购明细信息
     * 
     * @param id 采购明细主键
     * @return 结果
     */
    @Override
    public int deleteCDetailsById(Long id)
    {
        return cDetailsMapper.deleteCDetailsById(id);
    }
}
